import { HomeComponent } from './home.component';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

const routes: Routes = [
  {
    path: '',
    component: HomeComponent,
    children: [
      // { path: '', redirectTo: 'personnel', pathMatch: 'full' },
      { path: 'personnel', loadChildren: () => import('../companyInfo/personnel/personnel.module').then(m => m.PersonnelModule) },
      { path: 'role', loadChildren: () => import('../companyInfo/role/role.module').then(m => m.RoleModule) },
      { path: 'detailsRole', loadChildren: () => import('../companyInfo/role/details-role/details-role.module').then(m => m.DetailsRoleModule) },
      { path: 'editorganization', loadChildren: () => import('../companyInfo/organization/edit-organization/edit-organization.module').then(m => m.EditOrganizationModule) },
      { path: 'detailsOrganization', loadChildren: () => import('../companyInfo/organization/details-organization/details-organization.module').then(m => m.DetailsOrganizationModule) },
      { path: 'editPersonnel', loadChildren: () => import('../companyInfo/personnel/edit-personnel/edit-personnel.module').then(m => m.EditPersonnelModule) },
      { path: 'editDepartment', loadChildren: () => import('../companyInfo/organization/edit-department/edit-department.module').then(m => m.EditDepartmentModule) },
      { path: 'page', loadChildren: () => import('../../common/page-render/page-render.module').then(m => m.PageRenderModule) },
      {
        path: 'employeeList',
        loadChildren: () => import('../../pages/companyInfo/employee/employee.module').then(m => m.EmployeeModule)
      },
      {
        path: 'permission',
        loadChildren: () => import('../../pages/companyInfo/organization/permission/permission.module').then(m => m.PermissionModule)
      },
      {
        path: 'other',
        loadChildren: () => import('../../pages/companyInfo/other/other.module').then(m => m.OtherModule)
      },
      {
        path: 'document',
        loadChildren: () => import('../document/document.module').then(m => m.DocumentModule)
      },
      {
        path: 'superAuthority',
        loadChildren: () => import('../companyInfo/super-authority/super-authority.module').then(m => m.SuperAuthorityModule)
      },
      {
        path: 'place',
        loadChildren: () => import('../place/place.module').then(m => m.PlaceModule)
      }
    ]

  },


];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class HomeRoutingModule { }
